<div id="new_user_form">

	<% form_remote_for :user, :url => users_path(:region => "short") do |f| -%>
	<%= error_messages_for :user, :header_message => t('users.new.error_message') %>
	
	<div class="field">
		<table border="0" cellspacing="0" cellpadding="0">
			<tr><td valign="top">
				<div class="field_label">
					<%= t('settings.edit.first_name.label')%>
				</div>
				<div class="field_box">
		    		<%= f.text_field :first_name, :size => 12 %> 
				</div>
			</td><td valign="top" style="padding-left: 3px;">
				<div class="field_label">
					<%= t('settings.edit.last_name.label')%>
				</div>
				<div class="field_box">
		    		<%= f.text_field :last_name, :size => 15 %>
				</div>
			</td>
			</tr>
		</table>
		<div class="small"><%= t('settings.edit.first_name.example')%></div>
	</div>

	<div class="field">
		<div class="field_label">
			<%= t('settings.edit.email.label')%>
		</div>
		<div class="field_box">
			<%= f.text_field :email %>
		</div>
		<div class="small"><%= t('settings.edit.email.example')%></div>
	</div>

	<div class="field">
	<table border="0" cellspacing="0" cellpadding="0">
		<tr><td valign="top">
			<div class="field_label"><%= t('users.new.password.label')%></div>
			<div class="field_box">
			<%= f.password_field :password, :size => 13 %>
			</div>
		</td><td valign="top" style="padding-left: 3px;">
			<div class="field_label"><%= t('users.new.password.confirm')%></div>
			<div class="field_box">
			<%= f.password_field :password_confirmation, :size => 13 %>
			</div>
		</td>
		</tr>
	</table>
	</div>

	<div class="field">
	<div class="field_label">
		<%= t('settings.edit.login.label')%>
	</div>
	<div class="field_box">
		<%= f.text_field :login, :maxlength => 40, :size => 30 %>
	</div>
	<div class="small"><%= t('settings.edit.login.example')%></div>
	</div>

	<% if current_government.is_branches? %>
		<div class="field">
		<div class="field_box">
			<%= t('settings.edit.branch.label')%> <%= f.select :branch_id, current_branches.collect{|t|[t.name, t.id]} %>
		</div>
		</div>
	<% end %>

	<% if current_partner and current_partner.is_optin? %>

		<%= check_box_tag "user[partner_ids][]", current_partner.id, 1 %>
		<%= current_partner.optin_text %>
		<span class="small" style="padding-left:2px;">from
			<% if current_partner.has_website? %>
			<a href="<%= current_partner.website_link %>"><%= current_partner.name %></a>
			<% else %>
			<%= h(current_partner.name)%>
			<% end %>(<a href="<%= current_partner.privacy_url %>"><%= t('partners.privacy_policy')%></a>)
		</span>

	<% end %>

	<% if @priority %>
		<% if @value == 1 %>
			<%= submit_tag t('users.new.submit_and_endorse'), :class => "yellow_button" %>			
		<% elsif @value == -1 %>					
			<%= submit_tag t('users.new.submit_and_oppose'), :class => "yellow_button" %>
		<% else %>
			<%= submit_tag t('users.new.submit'), :class => "yellow_button" %>				
		<% end %>
	<% else %>
		<%= submit_tag t('users.new.submit'), :class => "yellow_button" %>
	<% end %>

	<% end -%>

</div>